<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Change album settings : ${album.title}</title>
</head>
<body>

<a href="./LogoutController">Log out</a> <br/>
<a href="./editUser.jsp">Edit personal information</a> <br/>
<a href="./HomeController">Home</a> <br/>

<h1>Change album settings : <c:out value="${album.title}" /> </h1>

<form action="./ChangeAlbumSettingsController" method="post" accept-charset="UTF-8">
	
	<input type="hidden" value="${ album.id }" name="albumId" />	
		<table>
			<tr>
				<td><label>Title: </label></td>
				<td><input type="text" id="title" name="title" value="${album.title}" required></td>
			</tr>
			
			<tr>
				<td><label>Description: </label></td>
				<td><input type="text" id="description" name="description" value="${album.desription}"></td>
			</tr>
			
			<tr>
				<td><label>Public visibility: </label></td>
				<c:if test="${album.publiclyAvailable == true}">
				<td><input type="checkbox" id="public" name="public" checked="checked"></td>
				</c:if>
				<c:if test="${album.publiclyAvailable != true}">
				<td><input type="checkbox" id="public" name="public"></td>
				</c:if>
			</tr>
			<tr>
			
				<td><input type="submit" value="Submit"></td>
			</tr>
		</table>
</form>
</body>
</html>